<!--
<confirm ref="confirm"></confirm>

this.$refs.confirm.show({
    title: '系统提示',
    message: '确认重置表单数据?',
    param: this.$refs,
    ok (param) {
        console.info(param);
        param.userForm.resetFields();
        console.info('reset.');
    },
    cancel (param) {
        console.info('reset cancel.');
    }
});
 -->
<template></template>

<script>
  export default {
    methods: {
      show (options) {
        this.$confirm(options.message, options.title, {
          confirmButtonText: '确定',
          cancelButtonText: '取消',
          type: 'warning'
        })
          .then(() => {
            options.ok(options.param);
          })
          .catch(() => {
            options.cancel();
          });
      }
    }
  };
</script>
